



Route::group(function () {
    //商城
        Route::get("/category_index", "app\admin\controller\StoreCategory@index")->name("goods.category_index");// 分类列表
        Route::post("/category_create", "app\admin\controller\StoreCategory@create")->name("goods.category_create");// 分类添加
        Route::post("/category_edit", "app\admin\controller\StoreCategory@edit")->name("goods.category_edit");// 分类编辑
        Route::post("/category_delete", "app\admin\controller\StoreCategory@delete")->name("goods.category_delete");// 分类删除
        Route::get("/category_detail", "app\admin\controller\StoreCategory@detail")->name("goods.category_detail"); //分类详情

        Route::get("/goods_rule_index", "app\admin\controller\ProductRule@index")->name("goods.rule_index");// 规格列表
        Route::post("/goods_rule_create", "app\admin\controller\ProductRule@create")->name("goods.rule_create");// 规格创建
        Route::get("/goods_rule_detail", "app\admin\controller\ProductRule@detail")->name("goods.rule_detail");// 规格详情
        Route::post("/goods_rule_edit", "app\admin\controller\ProductRule@edit")->name("goods.rule_edit");// 规格详情

        Route::get("/goods_index", "app\admin\controller\Goods@index")->name("goods.index");// 商品列表
        Route::post("/goods_create", "app\admin\controller\Goods@create")->name("goods.create");// 商品创建
        Route::get("/goods_detail", "app\admin\controller\Goods@get_product_info")->name("goods.detail");// 商品详情
        Route::post("/goods_edit", "app\admin\controller\Goods@edit")->name("goods.edit");// 商品编辑
        Route::post("/goods_delete", "app\admin\controller\Goods@del")->name("goods.delete");// 商品删除
        Route::post("/goods_format", "app\admin\controller\Goods@is_format_attr")->name("goods.format");// 商品属性生成
    
        Route::get("/order_index", "app\admin\controller\Order@index")->name("order.index");// 订单列表
        Route::get("/order_detail", "app\admin\controller\Order@detail")->name("order.detail");// 订单详情
        Route::post("/order_edit", "app\admin\controller\Order@edit")->name("order.edit");// 订单编辑
        Route::post("/order_deliver", "app\admin\controller\Order@deliver")->name("order.deliver");// 订单发货
        Route::post("/order_refundyes", "app\admin\controller\Order@refund_y")->name("order.refund_y");// 订单审核通过
        Route::post("/order_refundno", "app\admin\controller\Order@refund_n")->name("order.refund_n");// 订单审核拒绝
        Route::get("/order_log", "app\admin\controller\Order@order_log")->name("order.log");// 订单日志
        Route::post("/order_export", "app\admin\controller\Order@export")->name("survey.export");// 订单导出

        Route::get("/coupon_template_index", "app\admin\controller\CouponTemplate@index")->name("marketing.coupon_template");// 优惠券模板列表
        Route::post("/coupon_template_add", "app\admin\controller\CouponTemplate@create")->name("marketing.coupon_template_add");// 优惠券模板添加
        Route::post("/coupon_template_create", "app\admin\controller\CouponTemplate@create")->name("marketing.coupon_template_create");// 优惠券模板创建
        Route::get("/coupon_template_detail", "app\admin\controller\CouponTemplate@detail")->name("marketing.coupon_template_detail");// 优惠券模板详情
        Route::post("/coupon_template_edit", "app\admin\controller\CouponTemplate@edit")->name("marketing.coupon_template_edit");// 优惠券模板编辑
        Route::post("/coupon_template_delete", "app\admin\controller\CouponTemplate@delete")->name("marketing.coupon_template_delete");// 优惠券模板删除
        Route::post("/coupon_template_issue", "app\admin\controller\CouponTemplate@issue")->name("marketing.coupon_template_issue");// 优惠券发布
        Route::get("/coupon_index", "app\admin\controller\Coupon@index")->name("marketing.coupon_index");// 优惠券列表    
        Route::get("/coupon_log", "app\admin\controller\Coupon@coupon_log")->name("marketing.coupon_log");// 优惠券领取记录
        Route::post("/coupon_delete", "app\admin\controller\Coupon@delete")->name("marketing.coupon_delete");// 优惠券删除
        Route::get("/coupon_user", "app\admin\controller\Coupon@coupon_user")->name("marketing.coupon_user");// 优惠券领取记录

        Route::get('/get_echarts_order', 'app\admin\controller\Record@get_echarts_order')->name('record.get_echarts_order'); //数据统计 订单数据
        Route::get('/get_echarts_product', 'app\admin\controller\Record@get_echarts_product')->name('record.get_echarts_product'); //数据统计 商品数据
        Route::get('/get_echarts_collection','app\admin\controller\Record@get_echarts_collection')->name('record.get_echarts_collection'); //数据统计 商品收藏数据
        Route::get('/get_echarts_profity', 'app\admin\controller\Record@get_echarts_profity')->name('record.get_echarts_profity'); //数据统计 商品销售数据
        Route::get('/get_echarts_stock', 'app\admin\controller\Record@get_echarts_stock')->name('record.get_echarts_stock'); //数据统计 商品库存数据
        Route::get('/getTuiPriesList', 'app\admin\controller\Record@getTuiPriesList')->name('record.getTuiPriesList'); //数据统计 商品退货数据
    })
->allowCrossDomain()// 跨域
->middleware(middleware\Auth::class)// jwt认证
->middleware(middleware\Permission::class);// 权限认证

    //分销员
    Route::group(function () {
        $common = "\\app\\admin\\controller\\";
        Route::get("/distributor_index", "app\admin\controller\Distributor@index")->name("distributor.index");// 列表
        Route::get("/distributor_detail", "app\admin\controller\Distributor@detail")->name("distributor.detail");// 详情
        Route::post("/distributor_delete", "app\admin\controller\Distributor@delete")->name("distributor.delete");// 删除
        Route::post("/distributor_create", "app\admin\controller\Distributor@create")->name("distributor.create");// 创建  
        Route::post("/distributor_yes", "app\admin\controller\Distributor@yes")->name("distributor.yes");// 审核通过
        Route::post("/distributor_no", "app\admin\controller\Distributor@no")->name("distributor.no");// 审核拒绝
        Route::post("/distributor_edit", "app\admin\controller\Distributor@edit")->name("distributor.edit");
        Route::get("/user_commission_index","app\admin\controller\UserCommission@index")->name("user_commission.index"); //分销订单
        Route::get("user_commission_export","app\admin\controller\UserCommission@user_commission_export")->name("user_commission.user_commission_export"); //分销订单导出
        
    })

    
->allowCrossDomain() // 跨域
->middleware(middleware\Auth::class)// jwt认证
->middleware(middleware\Permission::class);// 权限认证


    //提现
    Route::group(function () {
        Route::get("/withdrawal_index", "app\admin\controller\Withdrawal@index")->name("withdrawal.edit");// 列表 
        Route::post("/withdrawal_yes", "app\admin\controller\Withdrawal@yes")->name("withdrawal.yes");// 审核通过
        Route::post("/withdrawal_no", "app\admin\controller\Withdrawal@no")->name("withdrawal.no");// 审核拒绝
        Route::get("user_withdrawal_export","app\admin\controller\Withdrawal@user_withdrawal_export")->name("withdrawal.user_withdrawal_export"); //分销订单导出
        
    })

        
    ->allowCrossDomain() // 跨域
    ->middleware(middleware\Auth::class)// jwt认证
    ->middleware(middleware\Permission::class);// 权限认证